package cn.tedu.boot31.controller;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Classname: AxiosController
 * @Author: bromide
 * @CreateTime: 2022/5/12--14:40
 * @Version: V1.0
 * @Description:
 */
@RestController
public class AxiosController {
    @RequestMapping("/helloAxios")
    /*
        @RequestBody注解作用:
        当客户端发送post请求并且提交的是自定义对象时
        服务器端接受参数必须使用此注解 否则得不到传递过来的参数.
     */
    public String hello(@RequestBody String info){
        return "请求成功!  info="+info;
    }
}
